package com.changgou.oauth.controller;

import com.changgou.oauth.service.UserLoginService;
import org.apache.http.protocol.HttpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import sun.java2d.pipe.ValidatePipe;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;


/**
 * @ClassName LoginRedirect
 * @Description 用户登录
 * @Author Mr.L
 * @Date 11:40 2019/11/25
 * @Version 2.1
 **/
@Controller
@RequestMapping("/oauth")
public class LoginRedirect {

    /**
     * 跳转登录页面
     * @return
     */
    @GetMapping("/login")
    public String login(@RequestParam(value = "FROM", required = false) String from, Model model){
        model.addAttribute("from", from);
        return "login";
    }

}
